package cn.itheima.service.impl;

import org.hibernate.Session;
import org.hibernate.Transaction;

import cn.itheima.dao.LinkCustomerDao;
import cn.itheima.dao.impl.LinkCustomerDaoImpl;
import cn.itheima.domain.Customer;
import cn.itheima.domain.LinkCustomer;
import cn.itheima.service.LinkCustomerService;
import cn.itheima.utils.HibernateUtils;

public class LinkCustomerServiceImpl implements LinkCustomerService{

	LinkCustomerDao  link=new  LinkCustomerDaoImpl();
	
	
	@Override
	public void save(LinkCustomer l) {
		// TODO Auto-generated method stub
		Session session=HibernateUtils.getCurrentSession();
		Transaction  tx= session.beginTransaction();
		link.save(l);
		tx.commit();
		session.close();
	}


}
